<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="btn" style="background: red; width: 20px; height: 20px;">Button</div>
<div id="div" style="background: grey; width: 100px; height: 100px;">Div</div>
<!--Click button test-->
<script>
    document.querySelector('#btn').addEventListener('click', function () {
        throw new Error('Button clicked');
    });

    window.selectorCallCount = 0;
</script>
<!--Click without offset options test-->
<script>
    document.querySelector('#div').addEventListener('click', function (e) {
        var rect = document.getElementById('div').getBoundingClientRect();

        window.clickOffset = { x: e.pageX - rect.left, y: e.pageY - rect.top };
    });
</script>
<div id="status"></div>
<input id="statusBtn" type="button">
<script>
    document.querySelector('#statusBtn').addEventListener('click', function () {
        var status = document.querySelector('#status');

        status.textContent = 'Clicked!';
    });
</script>
</body>
</html>
